//home-api.js文件

import Request from './request.js'
let request = new Request().http
/*
 * 请求样式：
    自定义名字: function(data) {
        return request({
            url: "/banner", //请求头
            method: "GET", //请求方式 
            data: data,    //请求数据
            whetherData: true,  //是否数据格式规范接口
            hideLoading: false, //加载样式
        })
    }, 
 */
function get(url, data, whetherData = true, hideLoading, header) {
	return request({
		url: url,
		method: 'GET',
		data: data,
		header: header,
		whetherData: whetherData
	})
}

function post(url, data, whetherData = true, hideLoading, header) {
	return request({
		url: url,
		method: 'POST',
		data: data,
		header: header,
		whetherData: whetherData,
		hideLoading: hideLoading,
	})
}

let api = {
	/*
	 *  ================用户相关=================
	 */
	// 发送验证码
	sendCode: (data, herder) => post('/api/index/sendCodev3', data, true, false, herder),
	// 验证码登录
	phoneRegister: data => post('/api/index/phoneRegister', data, true, false),
	// 密码登录
	phoneLogin: data => post('/api/index/phoneLogin', data, true, false),
	// 修改个人资料
	editUser: data => post('/api/index/editUser', data, true, true),
	// 设置密码
	setPwd: data => post('/api/index/setPwd', data, true, true),
	// 修改密码
	editPwd: data => post('/api/index/editPwd', data, true, true),
	// 会员卡登录
	memberLogin: data => post('/api/index/memberLogin', data, true, true),
	// 会员卡绑定
	memberBind: data => post('/api/index/memberBind', data, true, true),
	// 验证票据
	verify: data => post('/api/index/verify', data, true, false),
	// 保存志愿表
	zySave: data => post('/api/index/zySave', data, true, true),
	// 获取志愿表列表
	zyList: data => {
		data.fronttype = 3
		data.isStudentSee = 1
		return post('/api/index/zyList', data, true, false)
	},
	// 获取志愿表详情
	zyInfo: data => post('/api/index/zyInfo', data, true, true),
	// 获取志愿表详情1  智能填报修改Loading
	zyInfo1: data => post('/api/index/zyInfo', data, true, false),
	// 获取关注列表
	likeList: data => post('/api/index/likeList', data, true, false),
	// 保存关注
	likeSave: data => post('/api/index/likeSave', data, true, false),
	// 微信登录
	wxdl: data => post('/api/index/wechatLogin', data, true, false),
	// 苹果登录
	pgdl: data => post('/api/index/appleLogin', data, true, false),
	// 查询openid和access_token
	getWeChatAccessTokenXcx: data => post('/api/index/getWeChatAccessTokenXcx', data, true, false),

	/*
	 *  ================公共=================
	 */
	// 检查版本
	checkVersion: data => post('/api/index/checkVersion', data, true, false),

	// 获取省份信息
	provinceInfo: data => post('/api/index/provinceInfo', data, true, false),
	provinceInfoLetter: data => post('/api/index/provinceInfoLetter', data, true, false),

	// 获取热门新闻
	hotNews: data => post('/api/index/hotNews', data, true, false),
	hotNewsPush: data => post('/api/index/hotNewsPush', data, true, false),

	hasPushRed: data => post('/api/index/hasPushRed', data, true, false),
	// 获取高考倒计时
	howManyDays: data => post('/api/index/howManyDays', data, true, false),

	//是否高考版
	isGKB: data => post('/api/index/isGKB', data, true, false),
	// 获取高考版信息
	gkbInfo: data => post('/api/index/gkbInfo', data, true, false),


	/*
	 *  ================查学校=================
	 */
	// 获取大学列表
	searchSchool: data => post('/api/index/searchSchool', data, true, false),
	searchSchoolAll: data => post('/api/index/searchSchoolAll', data, true, false),
	// 获取大学筛选条件
	searchSchoolFilter: data => post('/api/index/searchSchoolFilter', data, true, false),
	// 获取排名筛选条件
	rankInfoFilter: data => post('/api/index/rankInfoFilter', data, true, true),
	// 获取排名信息
	rankInfo: data => post('/api/index/rankInfo', data, true, false),
	// 获取学校信息 data: {"sids":"1,2,3,4,5"}  学校IDs
	rankSchoolInfo: data => post('/api/index/rankSchoolInfo', data, true, true),
	// 获取学校首页信息
	schoolHome: data => post('/api/index/schoolHome', data, true, true),
	// 获取学校文章列表
	schoolNews: data => post('/api/index/schoolZS', data, true, false),
	// 获取学校文章详情
	schoolNewsDetail: data => post('/api/index/schoolZSDetail', data, true, false),
	// 获取文章详情
	newsDetail: data => post('/api/index/newsDetail', data, true, false),
	// 获取学校历年录取分数线
	schoolYearline: data => post('/api/index/schoolYearline', data, true, false),
	// 获取学校历年录取分数线筛选条件
	schoolYearlineFilter: data => post('/api/index/schoolYearlineFilter', data, true, false),
	// 获取学校专业分数线信息
	schoolScoreline: data => post('/api/index/schoolScoreline', data, true, false),
	// 获取学校专业分数线筛选条件
	schoolScorelineFilter: data => post('/api/index/schoolScorelineFilter', data, true, false),
	// 获取学校招生计划筛选条件
	schoolPlanFilter: data => post('/api/index/schoolPlanFilter', data, true, false),
	// 获取学校招生计划筛选条件
	schoolPlan: data => post('/api/index/schoolPlan', data, true, false),
	// 学校录取率
	schoolEnrollChance: data => post('/api/index/schoolEnrollChance', data, true, false),
	// 测录取率
	schoolEnrollChanceTest: data => post('/api/index/schoolEnrollChanceTest', data, true, false),
	// 获取热门大学列表
	homeHotSchool: data => post('/api/index/hotSchool', data, true, false),
	// 获取更多年份的学校或专业信息
	moreYearInfo: data => post('/api/index/moreYearInfo', data, true, false),
	// 学校分数提前批
	schoolPreBatchFilter: data => post('/api/index/schoolPreBatchFilter', data, true, false),
	//查询大学图片
	schoolImgs: data => post('/api/index/schoolImgs', data, true, true),
	//学校院系专业
	schoolYXMajor: data => post('/api/index/schoolYXMajor', data, true, true),
	//学校学科评估
	schoolSubjectEvaluate: data => post('/api/index/schoolSubjectEvaluate', data, true, true),
	//学校就业报告
	schoolJY: data => post('/api/index/schoolJY', data, true, true),
	// 就业报告链接转换
	changeUrl: data => post('/api/home/changeUrl', data, true, true),

	schoolYearlineDesc: data => post('/api/index/schoolYearlineDesc', data, true, true),
	// 硕博点详情
	schoolSbd: data => post('/api/index/schoolSbd', data, true, true),

	//获取学校专业筛选高级条件
	searchMajorFilter: data => post('/api/index/searchMajorFilter', data, true, true),

	/*
	 *  ================各类描述信息=================
	 */
	noteDescAPI: data => post('/api/index/noteDesc', data, true, false),


	/*
	 *  ================查专业=================
	 */
	searchHotMajor: data => post('/api/index/hotMajor', data, true, true),
	searchAllMajor: data => post('/api/index/allMajor', data, true, true),
	searchAllMajored: data => post('/api/index/searchMajor', data, true, false),
	searchMajorDetail: data => post('/api/index/majorDetail', data, true, true),
	searchMajorJob: data => post('/api/index/searchMajorJob', data, true, true),
	suggestMajor: data => post('/api/index/suggestMajor', data, true, false),
	searchMajorSchool: data => post('/api/index/searchMajorSchool', data, true, false),
	/*
	 *  ================查职业=================
	 */
	searchjobs: data => post('/api/index/searchJob', data, true, true),
	searchjobsDetail: data => post('/api/index/careerDetail', data, true, true),
	hotSchool: data => post('/api/index/hotSchool', data, true, true),
	batchlineFilter: data => post('/api/index/controlLineFilter', data, true, true),
	controlLineInfo: data => post('/api/index/controlLineInfo', data, true, true),
	hotCareer: data => post('/api/index/hotCareer', data, true, true),
	hotCompany: data => post('/api/index/hotCompany', data, true, true),
	searchCareer: data => post('/api/index/searchCareer', data, true, true),
	careerJobPosition: data => post('/api/index/careerJobPosition', data, true, true),
	allCareer: data => post('/api/index/allCareer', data, true, true),
	/*
	 *  ================一对一=================
	 */
	askExperts: data => post('/api/index/askExperts', data, true, true),

	//获取专家列表
	expertsTeamList: data => post('/api/index/expertsTeamList', data, true, true),


	// 一分一段
	// 筛选
	scoreStageFilter: data => post('/api/index/scoreStageFilter', data, false, false),

	// 信息
	scoreStageInfo: data => post('/api/index/scoreStageInfo', data, true, false),

	// batchlineFilter: data => post('/api/index/controlLineFilter', data, true, true),

	// 智能填报批次线
	batchlineInfo: data => post('/api/index/batchLineInfo', data, true, false),

	// 选科助手
	selectHelper: data => post('/api/index/selecthelperCP', data, true, false),
	selectHelperSearch: data => post('/api/index/selectHelperSearch', data, true, false),
	selectSearchSchool: data => post('/api/index/selectSearchSchool', data, true, false),
	selectSearchMajor: data => post('/api/index/selectSearchMajor', data, true, false),
	selectProvince: data => post('/api/index/selectProvince', data, true, false),
	//选科各组合关联性
	selectMatchContact: data => post('/api/index/selectMatchContact', data, true, false),
	//选科按学校搜索专业
	selectSearchSchoolMajor: data => post('/api/index/selectSearchSchoolMajor', data, true, false),
	//选科按学校搜索匹配率
	selectSearchSchoolMatch: data => post('/api/index/selectSearchSchoolMatch', data, true, false),

	//选科助手匹配率
	fitRate: data => post('/api/index/selectMatchRatio', data, true, false),

	//选科各组合综合匹配率
	selectMatchRate: data => post('/api/index/selectMatchRate', data, true, false),
	//选科按专业类搜索
	selectSearchMajorClass: data => post('/api/index/selectSearchMajorClass', data, true, false),
	//选科按专业搜索匹配率
	selectSearchMajorMatch: data => post('/api/index/selectSearchMajorMatch', data, true, false),

	//选科助手保存
	selectResSave: data => post('/api/index/selectResSave', data, true, false),
	//选科信息查询
	selectResInfo: data => post('/api/index/selectResInfo', data, true, false),
	//选科政策
	selectPolicy: data => post('/api/index/selectPolicy', data, true, false),
	//测评专业推荐 
	selectSearchMajorClassJudge: data => post('/api/index/selectSearchMajorClassJudge', data, true, false),
	// h5专业推荐-更换新接口
	problem: data => post('/api/judg/problem', data, true, false),
	//七牛云token
	getUploadToken: data => post('/api/index/getUploadToken', data, true, false),
	getUploadTokenCommunityAPI: data => post('/api/index/getUploadTokenCommunity', data, true, false),

	//注销账号
	deleteAccount: data => post('/api/index/deleteUser', data, true, false),
	//查询用户
	checkUser: data => post('/api/index/checkUser', data, true, false),

	deleteUserReason: data => post('/api/index/deleteUserReason', data, true, false),
	//意见反馈deleteUserReason
	feedback: data => post('/api/index/feedback', data, true, false),
	//商务合作
	cooperate: data => post('/api/index/cooperate', data, true, false),

	// 获取微信外链
	getWeChatURLScheme: data => post('/api/index/getWeChatURLScheme', data, true, true),

	// 专家一对一预约
	reserveExperts: data => post('/api/index/reserveExperts', data, true, true),

	// 提前批 目录
	preBatchLevel: data => post('/api/index/preBatchLevel', data, true, false),

	// 提前批
	// preBatchPlan: data => post('/api/index/preBatchPlan', data, true, false),
	preBatchPlan: data => post('/api/index/preBatchPlan_new', data, true, false),

	// 新提前批搜索
	// preBatchPlanSearchSchool: data => post('/api/index/preBatchPlanSearchSchool', data, true, false),
	preBatchPlanSearchSchool: data => post('/api/index/preBatchPlanSearchSchool_new', data, true, false),

	// 提前批 分数
	preBatchSearch: data => post('/api/index/preBatchSearch', data, true, false),
	// 首页进入搜索页触发
	searchpage: data => post('/api/index/searchType', data, true, false),

	// 搜索类型
	searchType: data => post('/api/index/searchHome', data, true, false),
	// 优惠券倒计时
	leftTimeAPI: data => post('/api/index/leftTime', data, true, false),
	// 微信绑定手机号
	wechatBindAPI: data => post('/api/index/wechatBind', data, true, false),
	// 苹果绑定手机号
	appleBindAPI: data => post('/api/index/appleBind', data, true, false),

	/*
	 *  ================评测=================
	 */
	// 测评问题
	judgeQuestionAPI: data => post('/api/index/judgeQuestion', data, true, false),
	// 测评问题描述
	judgeQuestionDescAPI: data => post('/api/index/judgeQuestionDesc', data, true, false),
	// 测评结果保存
	judgeResSaveAPI: data => post('/api/index/judgeResSave', data, true, false),
	// 测评结果信息
	judgeResInfoAPI: data => post('/api/index/judgeResInfo', data, true, false),
	// 测评结果下载
	judgImgSave: data => post('/api/index/judgImgSave', data, true, false),

	//  ===================下载 
	downloadZYAPI: data => post('/api/index/downloadZY', data, true, false),

	//  ===================个人资料
	areaChildsAPI: data => post('/api/index/areaChilds', data, true, false),
	customerQuestionAPI: data => post('/api/index/customerQuestion', data, true, false),
	customerQuestionAskAPI: data => post('/api/index/customerQuestionAsk', data, true, false),
	customerQuestionAskGetAPI: data => post('/api/index/customerQuestionAskGet', data, true, false),

	//  ===================邀请
	invitedNewPageAPI: data => post('/api/index/invitedNewPage', data, true, false),
	invitedNew: data => post('/api/index/invitedNew', data, true, false),
	shareZY: data => post('/api/index/shareZY', data, true, false),


	getClassLvAPI: data => post('/api/index/getClassLv', data, true, false),
	phoneAutoLoginAPI: data => post('/api/index/phoneAutoLogin', data, true, false),

	//  ===================社区
	getCommunityAPI: data => post('/api/index/getCommunity', data, true, false),
	addLikeAPI: data => post('/api/index/addLike', data, true, false),
	delLikeAPI: data => post('/api/index/delLike', data, true, false),
	hotSubjectAPI: data => post('/api/index/hotSubject', data, true, false),
	sendCommunityAPI: data => post('/api/index/sendCommunity', data, true, false),
	addFollowAPI: data => post('/api/index/addFollow', data, true, false),
	delFollowAPI: data => post('/api/index/delFollow', data, true, false),
	getCommunityUserInfoAPI: data => post('/api/index/getCommunityUserInfo', data, true, false),
	getFollowAPI: data => post('/api/index/getFollow', data, true, false),
	getFollowMeAPI: data => post('/api/index/getFollowMe', data, true, false),

	// ====================微信支付
	creatWeChatOrderAPI: data => post('/api/index/creatWeChatOrder', data, true, false),
	/**
	 * @description 验证微信支付订单
	 */
	verifyWXPay: data => post('/api/index/verifyWXPay', data, true, false),

	// 获取配置信息
	conifgData: data => post('/api/index/conifgData', data, true, false),


	// 商品服务
	goodsList: data => post('/api/index/goodsList', data, true, false),
	goodsDetail: data => post('/api/index/goodsDetail', data, true, false),
	goodsPay: data => post('/api/index/goodsPay', data, true, false),

	// 开通会员，ios发短信
	sendPhoneH5: data => post('/api/index/sendPhoneH5', data, true, false),

	// 报考推荐
	tuijianconfig: data => post('/api/Filling/tuijianconfig', data, true, false),

	// 同分去向
	// 查询等效分
	scoreStage: data => post('/api/index/scoreStage', data, true, false),

	// 查询院校
	getSchoolsList: data => post('/api/samescore/schools', data, true, false),
	// 查询专业
	getMajorsList: data => post('/api/samescore/majors', data, true, false),
	// 查询地区
	getAreasList: data => post('/api/samescore/areas', data, true, false),

	// 获取sass配置信息
	getPlatformInfo: data => post('/api/index/platformInfo', data, true, false),

	// 获取用户协议隐私政策
	getPrivacyPolicy: data => post('/api/index/getPrivacyPolicy', data, true, false),
	// 获取临时token
	temporaryToken: data => post('/api/home/createTemporaryToken', data, true, false),
	// 获取服务合法域名
	getDomain: data => post('/api/home/domain', data, true, false),
	//学历要求趋势图
	careerNeedEdu: data => post("/api/career/careerNeedEdu", data, true, false),
	//人才需求趋势图
	careerNeed: data => post("/api/career/careerNeed", data, true, false),
	careerJobCompany: data => post('/api/index/careerJobCompany', data, true, true),
	//《专业定位测评》权限配置
	cepingauthAPI: data => post('/api/home/cepingauth', data, true, true),
}








export default api;